
<link href="${rc.getContextPath()}/manage/css/dwzCustomCss/dwz.custom.css?v=${ver}" rel="stylesheet" type="text/css">
<#include "/common/pagerForm.html">
<style>
<!--
.andonAttribute label{
width:110px;
}
-->
</style>
<form rel="pagerForm" method="post" action="" onsubmit="return navTabSearch(this)">
<input type="hidden" name="navTabId" value="${navTabId!''}" />
    <div class="pageHeader">
        <div class="searchBar andonAttribute" >
            <ul class="searchContent">
                <li ><label><@label key="andonAttributeCode.C,colon">ANDON属性编号：</@label></label> <input type="text" class="textInput" name="attributeCode" value="${condition.attributeCode!''}" /></li>
                <li ><label><@label key="andonAttributeText.C,colon">ANDON属性描述：</@label></label> <input type="text" class="textInput" name="attributeText" value="${condition.attributeText!''}" /></li>
            </ul>
            <ul class="searchContent">
                <li>
                    <label><@label key="andonAttributeType.C,colon">ANDON属性类型：</@label></label> 
                    <select name="valueTypeEcode" >
                        <option value=""> 所有</option>
                        <#if  ECode??&&(ECode?size>0)>
                            <#list ECode as eCode>
                                <!-- <#if eCode.eCode??&&eCode.eCode==andonAttribute.valueTypeCode>
                                </#if> -->
                                    <option value="${eCode.eCode!''}" 
                                    
                                    <#if condition.valueTypeEcode==eCode.eCode>
                                        selected="selected"
                                    </#if>
                                    >${eCode.eCodeText!''}</option>
                            </#list>
                        </#if>
                    </select>
                </li>
                <li class="lockFlag">
                    <div style="float: left;">
                        <label><@label key="lockFlag.L">锁定标记：</@label></label> <select name="lockFlag">
                            <option value=""><@label key="all.C">所有</@label></option>
                            <option value="0"<#if condition.lockFlag?? && condition.lockFlag == 0> selected="selected"</#if>><@label key="no.C">否</@label></option>
                            <option value="1"<#if condition.lockFlag?? && condition.lockFlag == 1> selected="selected"</#if>><@label key="yes.C">是</@label></option>
                        </select>
                    </div>
                    </li>
                    <li class="query">
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit"><@label key="query.B">查询</@label></button>
                            </div>
                        </div>
                    </li>
                    
            </ul>
        </div>
    </div>
</form>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
          <@buttonRight menuCode="andonAttribute_add" labelKey="add.B" defalutName="新增">
            <li><a class="add" target="dialog" mask="true" width="650" height="360" href="${rc.getContextPath()}/manage/andonAttribute/addAndonAttribute?navTabId=${navTabId!''}" rel="addandonAttribute" title="<@label key='addAndonAttribute.D'>新增ANDON属性</@label>"><span><@label key="add.B">新增</@label></span>
            </a>
            </li>
            </@buttonRight>
             <@buttonRight menuCode="andonAttribute_edit" labelKey="edit.B" defalutName="编辑">
            <li><a class="edit" target="dialog" mask="true" width="650" height="440" href="${rc.getContextPath()}/manage/andonAttribute/modifyAndonAttribute?id={andonAttribute_code}&navTabId=${navTabId!''}" rel="editandonAttribute"  title="<@label key='editAndonAttribute.D'>编辑ANDON属性</@label>"><span><@label key="edit.B">编辑</@label></span>
            </a>
            </li>
            </@buttonRight>
             <@buttonRight menuCode="andonAttribute_view" labelKey="view.B" defalutName="详情">
            <li><a id="viewDetail" class="icon" onClick="changeSize();"  rel="viewAndonAttribute" title="<@label key='viewAndonAttribute.D'>查看ANDON属性</@label>"><span><@label key="view.B">详情</@label></span>
            </a>
            </li>
            </@buttonRight>
             <@buttonRight menuCode="andonAttribute_del" labelKey="delete.B" defalutName="删除">
            <li><a class="delete" target="selectedTodo" href="${rc.getContextPath()}/manage/andonAttribute/deleteAndonAttribute?navTabId=${navTabId!''}" postType="string" rel="ids" callback="batchjobAjaxDone"
                title="<@label key='confirmDelAndonAttribute.M'>确认要删除选择的ANDON属性吗？</@label>"><span><@label key="delete.B">删除</@label></span>
            </a>
            </li>
            </@buttonRight>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="165" style="overflow:scroll;">
        <thead>
            <tr>
                <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                <th width="40"><@label key="serialNumber.C">序号</@label></th>
                <th width="120" orderField="attributeCode"<#if (page.orderField?? && page.orderField == 'attributeCode')>class="${page.orderDirection!''}"</#if>><@label key="andonAttributeCode.C">ANDON属性编号</@label></th>
                <th width="100" orderField="attributeText"<#if (page.orderField?? && page.orderField == 'attributeText')>class="${page.orderDirection!''}"</#if>><@label key="andonAttributeText.C">ANDON属性描述</@label></th>
                <th width="50" orderField="valueTypeEcode"<#if (page.orderField?? && page.orderField == 'valueTypeEcode')>class="${page.orderDirection!''}"</#if>><@label key="type.C">类型</@label></th>
                <th width="50" orderField="lockFlag"<#if (page.orderField?? && page.orderField == 'lockFlag')>class="${page.orderDirection!''}"</#if>><@label key="lockFlag.C">锁定标记</@label></th>
                <th width="50" orderField="requiredFlag"<#if (page.orderField?? && page.orderField == 'requiredFlag')>class="${page.orderDirection!''}"</#if>><@label key="requiredFlag.C">必填</@label></th>
                <th width="120" orderField="memo"<#if (page.orderField?? && page.orderField == 'memo')>class="${page.orderDirection!''}"</#if>><@label key="memo.C">备注</@label></th>
                <th width="100" orderField="createUser"<#if (page.orderField?? && page.orderField == 'createUser')>class="${page.orderDirection!''}"</#if>><@label key="createUser.C">创建人</@label></th>
                <th width="100" orderField="createDateTime"<#if (page.orderField?? && page.orderField == 'createDateTime')>class="${page.orderDirection!''}"</#if>><@label key="createDateTime.C">创建时间</@label></th>
                <th width="100" orderField="modifyUser"<#if (page.orderField?? && page.orderField == 'modifyUser')>class="${page.orderDirection!''}"</#if>><@label key="modifyUser.C">修改人</@label></th>
                <th width="100" orderField="modifyDateTime"<#if (page.orderField?? && page.orderField == 'modifyDateTime')>class="${page.orderDirection!''}"</#if>><@label key="modifyDateTime.C">修改时间</@label></th>
            </tr>
        </thead>
        <tbody>
            <#if page??><#if (page.data?size>0)> <#list page.data as andonAttribute>
            <tr target="andonAttribute_code" rel="${andonAttribute.attributeCode!''}">
                <td><input name="ids" value="${andonAttribute.attributeCode!''}" type="checkbox"></td>
                <td>${page.startRow + andonAttribute_index}</td>
                <td>${andonAttribute.attributeCode!''}</td>
                <td>${andonAttribute.attributeText!''}</td>
                <td>
                    <#list ECode as eCode>
                            <#if eCode.eCode==andonAttribute.valueTypeEcode>
                            ${eCode.eCodeText!''}
                            </#if>
                    </#list>
                </td>
                <td><#if (andonAttribute.lockFlag == 1)><@label key="yes.C">是</@label><#else><@label key="no.C">否</@label></#if></td>
                <td><#if (andonAttribute.requiredFlag == 1)><@label key="yes.C">是</@label><#else><@label key="no.C">否</@label></#if></td>
                <td>${andonAttribute.memo!''}</td>
                <td>${andonAttribute.createUser!''}</td>
                <td>${andonAttribute.createDateTime?string("yyyy-MM-dd HH:mm:ss")}</td>
                <td>${andonAttribute.modifyUser!''}</td>
                <td>${andonAttribute.modifyDateTime?string("yyyy-MM-dd HH:mm:ss")}</td>
            </tr>
            </#list> <#else>
                <tr >
                <td colspan="7"  class="noData">======<@label key="noListData.C">列表无数据</@label>=====
                </td>
            </tr>
            </#if> <#else>
            <tr >
                <td colspan="7"  class="noData">======<@label key="noListData.C">列表无数据</@label>=====
                </td>
            </tr>
            </#if>
        </tbody>
    </table>
    <#include "/common/panelBar.html">
    
</div>


<script>
function changeSize(){
            var id = $("#andonAttribute_code", navTab.getCurrentPanel()).val();
            var navTabId=$("input[name='navTabId']", navTab.getCurrentPanel()).val();
            if(id && id!=""){
                $.ajax({
                    async : false,
                    dataType : "json",
                    url:hostUrl +"/andonAttribute/changeDialogSize",
                    data:{'andonAttributeCode':id,"navTabId":navTabId},
                    success:function(data){
                        openDialog(data);
                    }
                });
            }
}


function openDialog(data)
{
    var JSONData=JSON.parse(data.data);
    var title=JSONData.title;
    var widthL="650";
    var heightL="365";
    if(JSONData.type==="enum")
    {
        heightL="440";
    }    
    $.pdialog.open(data.forwardUrl, data.rel, title,
                {width:widthL,height:heightL,minable:false,mask:true,resizable:true});
    
}

</script>




